Born in Locke, New York, Millard Fillmore received no formal education as a child. He later studied law and entered politics, serving in the New York state assembly from 1829 until 1832. He was then elected to the U.S. House of Representatives, where he served from 1833 to 1835 and from 1837 to 1843. In 1844 he ran unsuccessfully for governor of New York. In 1847 he became the comptroller, or financial controller, of New York State. The following year he was elected vice president on the Whig Party ticket and became president when Zachary Taylor died in office in 1850. As president, Fillmore approved the Compromise of 1850, which allowed new territories to decide for themselves whether to allow slavery. He also signed the Fugitive Slave Law, which required the return of runaway slaves to slaveholders. Fillmore sent Commodore Matthew Perry with a fleet to open Japan to western trade. In 1852 he unsuccessfully sought nomination as the Whig Party candidate for president. Four years later, he ran unsuccessfully as the presidential candidate of the Know-Nothing Party. After this last defeat, Fillmore retired to Buffalo, New York, where he died in 1874.